﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TestPlatform.Core;
using Aquiles.Helpers.Encoders;
using Apache.Cassandra;
using Aquiles.Helpers;
using Aquiles.Core.Cluster;
using Aquiles.Cassandra10;

namespace TestPlatform.Performer.Cassandra
{
    public class CassandraInsertPerformer : BaseInsertPerformer
    {
        public override string UnderlyinEngine { get { return "Cassandra"; } }

        public CassandraInsertPerformer()
            : base(new CassandraHelper())
        {

        }

        protected override void InsertEntity()
        {            
            Guid id = Guid.NewGuid();

            CassandraHelper.InsertUser(id, id.ToString(), id.ToString());

            for (int i = 0; i < TestConfig.InsertSubEntitiesCount; i++)
            {
                CassandraHelper.InsertPost(Guid.NewGuid(), "text text", id);
            }
        }
    }
}
